# $Id: urls.py 7557b5d4d82b 2012/12/02 09:07:16 pgurumur $
# Copyright (c) 2009 Prabhu Gurumurthy  <pgurumur@gmail.com>
# 
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#

__version__ = "$Revision: 7557b5d4d82b $"
__author__ = "$Author: pgurumur $"

from django.conf.urls.defaults import *
from djanet import views
from djanet.utils import scheduler

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

scheduler.run()

handler404 = "utils.handle404"
handler500 = "utils.handle500"

urlpatterns = patterns('',
    # Example:
    # (r'^djanet/', include('djanet.foo.urls')),

    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
    # to INSTALLED_APPS to enable admin documentation:
    (r'^admin/doc/', include('django.contrib.admindocs.urls')),
    # Uncomment the next line to enable the admin:
    (r'^admin/bgppeer/$', views.djanet_bgppeer),
    (r'^admin/neteng/$', views.djanet_neteng),
    (r'^admin/whois/$', views.djanet_whois),
    (r'^admin/getmask/$', views.djanet_getmask),
    (r'^admin/rfc4193/$', views.djanet_rfc4193),
    (r'^admin/', include(admin.site.urls)),
    (r'^nagios/$', views.djanet_nagios),
    (r'^checkbgp/(?P<device>(\d{1,3}\.){3}\d{1,3})/(?P<bgppeer>(\d{1,3}\.){3}\d{1,3})/$', views.djanet_checkbgp),
    (r'^mobile/$', views.djmobile_neteng),
    (r'^mobile/login/$', views.djanet_login),
    (r'^mobile/logout/$', views.djanet_logout),
    (r'^mobile/whois/$', views.djmobile_whois),
    (r'^mobile/dblist/(?P<table>(\w+))/$', views.djmobile_list),
)
